# New ports collection makefile for: py-peewee
# Date created:		2012-01-20
# Whom:		Olivier Duchateau <duchateau.olivier@gmail.com>
#
# $FreeBSD$
#

PORTNAME=	peewee
PORTVERSION=	0.9.0
CATEGORIES=	databases python
MASTER_SITES=	CHEESESHOP
PKGNAMEPREFIX=	${PYTHON_PKGNAMEPREFIX}

MAINTAINER=	duchateau.olivier@gmail.com
COMMENT=	A Little orm written in Python

USE_PYTHON=	2.6+
USE_PYDISTUTILS=	easy_install

OPTIONS=	SQLITE "Support SQLite" on \
	MYSQL "Support MySQL" off \
	POSTGRE "Support PostgreSQL" off

.include <bsd.port.pre.mk>

.if !defined(WITHOUT_SQLITE)
RUN_DEPENDS+=	${PYTHON_SITELIBDIR}/_sqlite3.so:${PORTSDIR}/databases/py-sqlite3
.endif

.if defined(WITH_MYSQL)
RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}MySQLdb>=1.2.3:${PORTSDIR}/databases/py-MySQLdb
.endif

.if defined(WITH_POSTGRE)
RUN_DEPENDS+=	${PYTHON_PKGNAMEPREFIX}psycopg2>=2.4.4:${PORTSDIR}/databases/py-psycopg2
.endif

.if !defined(NOPORTDOCS)
do-install:
	${MKDIR} ${DOCSDIR}
	${INSTALL_DATA} ${WRKSRC}/docs/${PORTNAME}/* ${DOCSDIR}
.endif

.include <bsd.port.post.mk>
